package edu.jmu.transaction;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class TransactionTest1 {
	public static void main(String[] args) {
		//使用这种方法处理事务非常复杂，要写很多配置信息
		String xmlpath = "classpath:transaction1.xml";
		ApplicationContext context = new ClassPathXmlApplicationContext(xmlpath);
		AccountService accountService = (AccountService)context.getBean("accountServiceProxy");
		accountService.transfer("jack", "tom", 1000);
		System.out.println("transfer done");
	}

}
